<template>
  <div>
    <div class="title">
      <van-nav-bar
        title="订单支付"
        left-text="返回"
        left-arrow
        @click-left="onClickLeft"
      />
    </div>
    <div class="goumai">
      <img src="../assets/img/dld.jpg" alt="" />
      <div>
        <p>五台山预约票</p>
        <p>¥100.00</p>
        <van-stepper v-model="value" />
        <van-cell  @click="show = true" >日期: {{$store.state.gouma}}</van-cell>
        <van-calendar v-model="show" @confirm="onConfirm" />
      </div>
      <van-submit-bar :price="sum*value" button-text="提交订单" />
    </div>
  </div>
</template>

<script>
export default {
    props:['item'],
  data() {
    return {
      show: false,
      sum: 10000,
      data: "",
      value: "",
      date: "",
    };
  },
  methods: {
    formatDate(date) {
      return `${date.getMonth() + 1}/${date.getDate()}`;
    },
    onConfirm(date) {
      this.show = false;
      this.date = this.formatDate(date);
    },
    setup() {
      const value = ref(1);
      return { value };
    },
    onClickLeft() {
      history.back(-1);
    },
  },
};
</script>

<style  scoped src="../assets/css/shopping.css"></style>
